import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';

void closeSoftKeyboard() {
  WidgetsBinding.instance.focusManager.primaryFocus?.unfocus();
}

bool isShowSoftKeyboard() {
  return WidgetsBinding.instance.focusManager.primaryFocus?.hasFocus ?? false;
}

void showSoftKeyboard(FocusNode focusNode) {
  if (focusNode.hasFocus == false) {
    FocusScope.of(Get.context!).requestFocus(focusNode);
  }
}
